package com.koalac.ironman.net.pojo.response;

import org.json.JSONObject;

import android.R.integer;

/**
 * 签到记录
 * @author cyleung  Sep 11, 2014
 */
public class Sign extends BaseResponse{
	/**
	 * 簽到的id
	 */
	private int id = 0;
	/**
	 * 签到者uid
	 */
	private int uid = 0;
	/**
	 * 签到时间
	 */
	private int dateline = 0;
	/**
	 * 签到者姓名
	 */
	private String username = "";
	/**
	 * 签到者职位名称
	 */
	private String postname = "";
	/**
	 * 是否有問題反饋
	 */
	private int isFeedback = 0;

	
	public void init(JSONObject source){
		if(null!= source){
			id = source.optInt("id");
			uid = source.optInt("uid");
			dateline = source.optInt("dateline");
			username = source.optString("username");
			postname = source.optString("post_name");
			isFeedback = source.optInt("is_feedback");
		}
	}
	/**
	 * 获取签到的uid
	 */
	public int getId() {
		return id;
	}

	/**
	 * 获取签到者uid
	 */
	public int getUid() {
		return uid;
	}

	/**
	 * 获取签到时间
	 */
	public int getDateline() {
		return dateline;
	}

	/**
	 * 获取签到者姓名
	 */
	public String getUsername() {
		return username;
	}

	/**
	 * 获取签到者职位名称
	 */
	public String getPostname() {
		return postname;
	}
	/**
	 * 获取是否有問題反饋
	 */
	public boolean getIsFeedback() {
		if(isFeedback == 0){
			return false;
		}
		return true;
	}
	public void setId(int id) {
		this.id = id;
	}

	public void setUid(int uid) {
		this.uid = uid;
	}

	public void setDateline(int dateline) {
		this.dateline = dateline;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public void setPostname(String postname) {
		this.postname = postname;
	}
	
	public void setIsFeedback(int isFeedback) {
		this.isFeedback = isFeedback;
	}



	
}
